<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Translator Management</title>
<?php $this->view('regions/head'); ?>
</head>
<body>
<div id="wrapper" class="block">
	<?php $this->view('regions/header'); ?>
	<div id="content" class="block">
		<!-- START FORM -->
		<?php echo form_open_multipart('admin/group/translator/save'); ?>
        <?php echo fx_control::newInstance('formKey')->createType('hidden')->setData('value', random_string('unique', 16))->render(); ?>
		<?php echo fx_control::newInstance('id')->createType('hidden')->binding($model, 'id')->render(); ?>
		<div class="formContainer stdWidth autoCenter autoHeight">
			<!-- HEADER FORM -->
			<div class="formHeader">
				<table class="fullWidth">
					<tr>
						<td class="column50">
							<h3 class="moduleHeader">
								<?php if (!$model->isLoaded()) :?>
									Edit New Translator
								<?php else :?>
									Edit Translator <?php echo $model->getName(); ?>
								<?php endif; ?>
							</h3>
						</td>
						<td class="column50 rightAlign">
							<button type="button" onclick="window.location='<?php echo site_url("admin/group/translator/index", true)?>'">
								<span>Back</span>
							</button>
							<button type="submit">
								<span>Save</span>
							</button>
							<button type="reset" onclick="window.location='<?php echo site_url("admin/group/translator/edit", true)?>'">
								<span>Reset</span>
							</button>
							<?php if ($model->isLoaded()) :?>
							<button type="button" onclick="window.location='<?php echo site_url("admin/group/translator/delete/", true)?>'">
								<span>Delete</span>
							</button>
							<?php endif; ?>
						</td>
					</tr>
				</table>
			</div>
			<!-- EDIT SECTION -->
			<div class="formContent block autoHeight">
				<h3 class="titleBlock">General Information</h3>
				<div class="contentBlock autoHeight">
					<?php echo fx_control::newInstance('translator[entity_type_id]')
													 ->createType('hidden')
													 ->setData('value', '3')
													 ->render(); 
					?>
					<table class="fieldSet fullWidth">
						<tr>
							<td class="fieldLabel">Name</td>
							<td class="fieldInput">
								<?php echo fx_control::newInstance('translator[name]')
													 ->createType('text')
													 ->binding($model, 'name')
													 ->render(); 
								?>
							</td>
						</tr>
						<tr>
							<td class="fieldLabel">Nickname</td>
							<td class="fieldInput">
								<?php echo fx_control::newInstance('translator[nickname]')
													 ->createType('text')
													 ->binding($model, 'nickname')
													 ->render(); 
								?>
							</td>
						</tr>
						<tr>
							<td class="fieldLabel">Icon</td>
							<td class="fieldInput">
								<?php echo fx_control::newInstance('translator_icon')
													 ->createType('file')
													 ->binding($model, 'icon')
													 ->render(); 
								?>
							</td>
						</tr>
						<tr>
							<td class="fieldLabel">email</td>
							<td class="fieldInput">
								<?php echo fx_control::newInstance('translator[email]')
													 ->createType('text')
													 ->binding($model, 'email')
													 ->render(); 
								?>
							</td>
						</tr>
						<tr>
							<td class="fieldLabel">Yahoo mail</td>
							<td class="fieldInput">
								<?php echo fx_control::newInstance('translator[yahoo]')
													 ->createType('text')
													 ->binding($model, 'yahoo')
													 ->render(); 
								?>
							</td>
						</tr>
						<tr>
							<td class="fieldLabel">Gmail</td>
							<td class="fieldInput">
								<?php echo fx_control::newInstance('translator[gmail]')
													 ->createType('text')
													 ->binding($model, 'gmail')
													 ->render(); 
								?>
							</td>
						</tr>
						<tr>
							<td class="fieldLabel">Description</td>
							<td class="fieldInput">
								<?php echo fx_control::newInstance('translator[description]')
													 ->createType('editor')
													 ->binding($model, 'description')
													 ->setData('id', 'translator_description')
													 ->render(); 
								?>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		<?php echo form_close(); ?>
	</div>
	<?php $this->view('regions/footer'); ?>
	<script language="javascript" type="text/javascript">
		jQuery("#translator_description").editor("<?php echo CKFINDER_BASE_DIR?>");
	</script>
</div>
</body>
</html>
